home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
examples
/
memtest.r
< prev
next >
Wrap
Text File
|
1994-04-25
|
420b
|
21 lines
//
// Beginning of test file `test.r' (just `load(test.r)' to test the
// memory problem)
//
load("estimate.r");
rand ("uniform", 0, 1);
B = rand(10,10)/20+eye(10,10);
x = [1:10]';
f = B*x;
ans = 0;
h = [0;0;0;0;0;0;1;0;0;0];
for (i in 1:10) {
ans[i] = 0;
for (j in 1:5) {
ans[i] = ans[i] + estimate(B, f, h, 10, 2^i);
system("/usr/ucb/ps -aux | grep rlab");
}
ans[i] = ans[i] / 5
}
write("stdout",ans);